import { createRouter, createWebHistory } from 'vue-router'
import LayoutView from '@/views/layout/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: '',
      component: LayoutView,
      children: [
        {
          path: '/home',
          name: 'home',
          component: () => import('@/views/home/index.vue'),
        },
        {
          path: '/about',
          name: 'about',
          component: () => import('@/views/about/index.vue'),
        },
        {
          path: '/table',
          name: 'eggs_table',
          component: () => import('@/views/eggs_table/index.vue'),
        },
        {
          path: '/test',
          name: 'test',
          component: () => import('@/views/test/index.vue'),
        },
      ],
    },
  ],
})

export default router
